package org.jeecg.modules.demo.pointcount.redis.thread.work;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.pointcount.entity.EventData;
import org.jeecg.modules.demo.pointcount.entity.SpecialEventData;
import org.jeecg.modules.demo.pointcount.redis.consumer.SendAndStorageProcess;
import org.jeecg.modules.demo.pointcount.service.IEventDataService;
import org.jeecg.modules.demo.pointcount.service.ISpecialEventService;

/**
 * @Author yw
 * @Date 2021/3/16 9:11
 */
@Slf4j
public class AddSpecialEventDataTask implements Runnable{
    //private static Logger logger = Logger.getLogger(EventData.class);

    private static SendAndStorageProcess sendAndStorageProcess;

    ISpecialEventService specialEventService;

    private SpecialEventData data;

    public AddSpecialEventDataTask(ISpecialEventService specialEventService, SpecialEventData data){
        this.data = data;
        this.specialEventService=specialEventService;
    }




    public AddSpecialEventDataTask(SpecialEventData data){
        this.data = data;
    }

    public void run() {
        this.specialEventService.insertSpecialEventData(data);
    }
}
